<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    

    <title>{$Think.config.site.title} - 站点配置</title>

    <meta name="keywords" content="{$Think.config.site.keywords}">

    <link href="{$Think.config.site.resource_url}css/bootstrap.min.css?v=3.3.5" rel="stylesheet">
    <link href="{$Think.config.site.resource_url}css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link href="{$Think.config.site.resource_url}css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="{$Think.config.site.resource_url}css/animate.min.css" rel="stylesheet">
    <link href="{$Think.config.site.resource_url}css/style.min.css?v=4.0.0" rel="stylesheet">

</head>
<style>
#listtable .fa{
	cursor:pointer;
	color:#1ab394;
	margin-right:1em;
}
.inpbox{
	border: none;
	padding:0;
}
.text-center{text-align: center !important;}
.ibox-title .tag{font-size: 12px; color: #e66c6c; font-weight: normal; display: inline-block; margin-left: 20px;}
</style>
<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
            <div class="col-sm-4">
                <div id="nestable-menu">
                    <button type="button" href="{:url('settime')}"  class="btn btn-success btn-sm" onclick="window.history.go(-1)">返回</button>
                </div>
            </div>
        </div>
    	<div class="form-horizontal">
      	<div class="row">
            <div class="col-sm-12">
                <div class="float-e-margins">
                    <div class="ibox-title">
                        <h5>时段管理</h5>
                        <span class="tag">时间点不要重复</span>
                    </div>
                    <div class="ibox-content">
                        <form id="frebate">
                        <div class="row">
                            {volist name="list" id="vo"}
                            <div class="form-group">
                                <label class="col-sm-1 control-label text-right">时间点：</label>
                                <div class="col-sm-2">
                                    <input type="hidden"  name="arr[{$vo['rebate_id']}][id]" readonly="readonly" value="{$vo['rebate_id']}">
                                    <input type="text" class="form-control selecttime{$vo['rebate_id']}" name="arr[{$vo['rebate_id']}][breaktime]" readonly="readonly" value="{$vo['breaktime']}">
                                </div>
                                <label class="col-sm-1 control-label text-right">提成点：</label>
                                <div class="col-sm-2">
                                    <input type="text" class="form-control" name="arr[{$vo['rebate_id']}][precent]" value="{$vo.precent}">
                                </div>
                            </div>
                            {/volist}
                            <div class="form-group">
                                <label class="col-sm-1 control-label text-right"></label>
                                <div class="col-sm-2">
                                    <button type="button" class="btn btn-primary save">保存</button>
                                </div>
                            </div>
                        </div>
                        </form>
                    </div>
                </div>
            </div>
 
   
        </div>
        </div>
    </div>

    <script src="{$Think.config.site.resource_url}js/jquery.min.js?v=2.1.4"></script>
    <script src="{$Think.config.site.resource_url}js/bootstrap.min.js?v=3.3.5"></script>
    <script src="{$Think.config.site.resource_url}js/plugins/peity/jquery.peity.min.js"></script>
    <script src="{$Think.config.site.resource_url}js/plugins/layer/layer.js"></script>
    <script src="{$Think.config.site.common_resource_url}js/majax.js"></script>
    <script src="{$Think.config.site.common_resource_url}js/laydateV5/laydate.js"></script>
</body>

</html>
<script>
$('.save').click(function(){
    var data = $('#frebate').serialize();
    majax('{:url("setTime")}',data,function(e){
        if (e.code > 0) {

        }else{
            layer.msg(e.msg,{icon:2});
        }
    })
})
{volist name="list" id="vo"}
//时间选择器
laydate.render({
    elem: '.selecttime{$vo.rebate_id}',
    type: 'time',
    format: 'H:mm',
});
{/volist}
</script>